package me.zhengjie.modules.lock.service.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.zelk.smartlock.common.constant.Constant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 请求离线密码
 **/
@ApiModel(value = "请求离线密码入参")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class LockDeviceOfflinePwdVO implements Serializable {
    @NotNull(message = "商户ID不能为空")
    @ApiModelProperty(value = "商户Id", dataType = "Long")
    private Long partnerId;

    @NotNull(message = "门锁绑定的Id不能为空")
    @ApiModelProperty(value = "门锁绑定的Id", dataType = "int")
    private Long lockOwnerId;

    @NotEmpty(message = "密码类型不能为空")
    @ApiModelProperty(value = "密码类型（once：一次性密码 normal：时效密码 forever：永久密码 clear：清空密码）", dataType = "String")
    private String type;

    @NotNull(message = "密码开始时间不能为空")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    @ApiModelProperty(value = "开始时间", dataType = "LocalDateTime")
    private LocalDateTime startTime;

    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    @ApiModelProperty(value = "结束时间", dataType = "LocalDateTime")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "密码别名", dataType = "String")
    private String alias;
}
